<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo</title>
    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
        }

        .box1 {
            background-color: darkgrey;
            float: left;
            /*padding: 0 30px;*/
            height: 50px;
            line-height: 50px;
            margin: 0 50px;
        }
        .item {
            float: left;
        }

        .item:hover {
            background-color: gray;
        }

        a {
            padding: 0 30px;
            display: block;
            height: 50px;
            text-decoration: none;
            color: #777777;
            font-size: 18px;
        }
    </style>
</head>
<body>
<div class="box1">
    <div class="item">
        <a href="#">HTML/CSS</a>
    </div>

    <div class="item">
        <a href="#">Browser Side</a>
    </div>

    <div class="item">
        <a href="#">Serve Side</a>
    </div>

    <div class="item">
        <a href="#">Programming</a>
    </div>

    <div class="item">
        <a href="#">XML</a>
    </div>

    <div class="item">
        <a href="#">Web Building</a>
    </div>

    <div class="item">
        <a href="#">Reference</a>
    </div>
</div>

</body>
</html>